package simulatepushpull;

import java.util.Random;

/**
 *
 * @author vipR
 */
public class StartUp {    
    public static void main(String[] args) {
        new StartUp(1);
    }    
    public StartUp(int simulationCount){
        Random RNG = new Random();
        for (int seed = 0; seed < simulationCount; seed++) { 
            RNG.setSeed(seed); 
              //runSimulation(params1); 
            //runSimulation(params2);  
            //compareResults(); 

            //simPush(5000,(1/12), RNG);
            simPull(RNG,(1/12),30,5000);
            //simKanban(RNG,5000,(1/12),900);

            }
         
        
        
        
    }    
    public void simPush (int orders,double inR, Random RNG)
    {
        System.out.println("Starting simPush...");
        SimulatePush spush = new SimulatePush(inR, RNG, orders);        
        while(spush.getServed() < orders)
            spush.processNextEvent();        
        System.out.println("simPush ended!");
                System.out.println("Cycle Time is " + spush.getCT());
        System.out.println("Throughput is " + spush.getTroughput());
    }    
    public void simPull (Random RNG, double inR,int wip_max, int orders)
    {
        System.out.println("Starting simPull...");
        SimulatePull spull = new SimulatePull(RNG,inR,wip_max,orders);        
        while (spull.getServed() < orders)
            spull.processNextEvent();
        System.out.println("simPull ended!");
                System.out.println("Cycle Time is " + spull.getCT());
        System.out.println("Throughput is " + spull.getTroughput());
    }
    public void simKanban (Random RNG,int orders,double inR,int aantalKanbans)
    {
        System.out.println("Starting simKanban...");
        SimulateKanban skanban = new SimulateKanban(RNG,inR,aantalKanbans,orders);        
        while (skanban.getServed() < orders)
            skanban.processNextEvent();
        System.out.println("simKanban ended!");
        System.out.println("Cycle Time is " + skanban.getCT());
        System.out.println("Throughput is " + skanban.getTroughput());
    }
}